package com.guli.mall.ali.oss.controller;

import com.aliyuncs.exceptions.ClientException;
import com.guli.common.utils.R;
import com.guli.mall.ali.oss.service.MessageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/*
 * @Author 罗
 * @date 2020/10/18 - 2:31 下午
 */
@RestController
@RequestMapping("/message")
public class MessageController {

    @Resource
    MessageService messageService;

    @GetMapping("/sendMessage")
    public R sendMessage(@RequestParam String phoneNumber, @RequestParam String code) throws ClientException {

        return messageService.sendMessage(phoneNumber, code);

    }
}
